package com.itmuch.cloud;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;


/**
 * 
 *Zuul指定path+serviceid
 *Zuul指定Path+url以及指定可用的服务节点时如何负载均衡
 *Zuul使用正则表达式指定路由规则,在microservice-gateway-zuul-exp这个项目讲解
 *Zuul路由的strip-prefix与order
 *Zuul的各种姿势，routes的直接访问显示当前的微服务有哪些，地址：http://localhost:8040/routes
 *
 *
 * Gateway服务网关：
 *  zuul:
 *     1.添加maven文件，zuul,eureka客户端，zuul依赖eureka,所以需要添加
 *     2.主类添加	@EnableZuulProxy
 *	   3.启动microservice-discovery-eureka，
 *			microservice-provider-user，
 *		   // microservice-consumer-movie-ribbon-with-hystrix，		
 *	   4.使用zuul访问user:http://localhost:8040/microservice-provider-user/simple/1，
 *				microservice-provider-use是eureka的serviceID	
 *	   5.在配置文件添加zuul:
 *               routes: 
 *                  microservice-provider-user: /user/**
 *     6.访问地址修改为：http://localhost:8040/user/simple/1             
 *     
 *     	
 *                  
 */
@EnableZuulProxy
@SpringBootApplication
public class MicroserviceGatewayZuulApplication {
	
	public static void main(String[] args) {
		SpringApplication.run(MicroserviceGatewayZuulApplication.class, args);
		
	}
	
	
}
